package io.gitee.redismq.comm.exception;

/**
 * @Description: redis mq异常
 * @Author: 孙浩
 * @CreateTime: 2025-03-06 09:31:30
 */
public class RedisMQException extends RuntimeException {
    public String code;
    public final String message;
    public String requestId;

    public RedisMQException(String message) {
        super(message);
        this.message = message;
    }

    public RedisMQException(String code, String message) {
        super("[" + code + "] " + message);
        this.message = message;
        this.code = code;
    }

    public RedisMQException(String code, String message, String requestId) {
        super("[" + code + "] " + message);
        this.message = message;
        this.code = code;
        this.requestId = requestId;
    }

    public RedisMQException(Exception e) {
        super(e);
        this.message = e.getMessage();
    }
}
